import ajax from "@/utils/request.js";

const getSuggestion = keyword => {
  return ajax({
    url: "/app/v1_0/suggestion",
    method: "GET",
    params: {
      q: keyword
    }
  });
};

//搜索结果信息
//q  关键词
//page  分页序号
const getSearchRes = obj => {
  const { q, page } = obj;
  return ajax({
    url: "/app/v1_0/search",
    method: "GET",
    params: {
      q,
      page
    }
  });
};

export { getSuggestion, getSearchRes };
